Conversion of generative design geometry to editable and watertight boundary representation in computer aided design

ABSTRACT

Methods, systems, and apparatus, including medium-encoded computer program products, for computer aided design of physical structures include, in at least one aspect, a fully automatic method of converting a generative design into an editable, watertight B-Rep by leveraging the generative solver input and representation to: (1) embed the exact input solid boundary surfaces where the design coincides with the input, (2) approximate everywhere else the design boundary with globally smooth, editable “organic” surfaces, and (3) join all surfaces to form a generative design output B-Rep.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of and claims priority to PCT Application No. PCT/US2019/034221, entitled CONVERSION OF GENERATIVE DESIGN GEOMETRY TO EDITABLE AND WATERTIGHT BOUNDARY REPRESENTATION IN COMPUTER AIDED DESIGN, and filed on May 28, 2019, which claims the benefit of priority to U.S. Provisional Application No. 62/758,053, entitled CONVERSION OF GENERATIVE DESIGN GEOMETRY TO EDITABLE AND WATERTIGHT BOUNDARY REPRESENTATION IN COMPUTER AIDED DESIGN, and filed on Nov. 9, 2018. The disclosures of the prior applications are considered part of and are incorporated by reference in the disclosure of this application.

BACKGROUND

This specification relates to computer aided design of physical structures, which can be manufactured using additive manufacturing, subtractive manufacturing and/or other manufacturing systems and techniques.

Computer Aided Design (CAD) software has been developed and used to generate three-dimensional (3D) representations of objects, and Computer Aided Manufacturing (CAM) software has been developed and used to manufacture the physical structures of those objects, e.g., using Computer Numerical Control (CNC) manufacturing techniques. Typically, CAD software stores the 3D representations of the geometry of the objects being modeled using a boundary representation (B-Rep) format. In a boundary representation model (B-Rep), geometry is stored in the computer using smooth and precise mathematical surfaces, in contrast to the discrete and approximate surfaces of a mesh model.

In addition, CAD software has been designed so as to perform automatic generation of 3D geometry (generative design) for a part or one or more parts in a larger system of parts to be manufactured. This automated generation of 3D geometry is often limited to a design space specified by a user of the CAD software, and the 3D geometry generation is typically governed by design objectives and constraints, which can be defined by the user of the CAD software or by another party and imported into the CAD software. The design objectives (such as minimizing the waste material or weight of the designed part) can be used to drive the geometry generation process toward better designs. The design constraints can include both structural integrity constraints for individual parts (i.e., a requirement that a part should not fail under the expected structural loading during use of the part) and physical constraints imposed by a larger system (i.e., a requirement that a part not interfere with another part in a system during use). Further, the inputs to a generative design process can include a set of input solids (B-Rep input) that specify boundary conditions for the generative design process, but many modern generative design solvers do not operate directly on the exact surface boundary representation of their input solids. Instead, B-Reps are sampled and replaced with volumetric representations such as level sets or tetrahedral or hexahedral meshes, which are significantly more convenient and efficient for the physical simulations and material synthesis computed by the solver.

SUMMARY

The conversion by generative design solvers of their input solids to volumetric representations introduces a loss of surface precision due to the limitations of the target representation. FIG. 2 shows an example of this, where the generative mesh segment 200 is extracted from a level set 0-isosurface meant to represent the overlaid semi-transparent solid 205. The accuracy loss is especially apparent near the solid sharp edges 210 and holes 215. While this loss is negligible in the context of the solver computations, in general it prevents the output of a generative design from representing sufficiently accurately the input solid surface geometry away from the organic material synthesized by the solver. Subsequently, when integrating the solver output within the complete model assembly, these surface inaccuracies often cause issues such as part interferences and manufacturing defects or anomalies. FIG. 3 shows an example of this for two versions 300, 320 of a model. A rod 305, which has been designed to fit through the holes of the input solids 310, fits properly when assembled with a generative B-Rep in accordance with the present disclosure, which reuses the input geometry. In contrast, a general surface reconstruction 325 violates the generative constraints causing interferences 330 with the rod. Note that the generative design geometry constraints can include solid B-Reps, such as the input solids 310, and are placed in

³ optimization domain to avoid interference (keep-out) and specify attachment joints (keep-in) with other parts in a CAD assembly.

To resolve these inaccuracies in the generative design geometry, the fully automatic method of the present disclosure converts a generative design into an editable, watertight B-Rep by leveraging the generative solver input and representation to: (1) embed the exact input solid boundary surfaces where the design coincides with the input, (2) approximate everywhere else the design boundary with globally smooth, editable “organic” surfaces, and (3) join all surfaces to form a generative design output B-Rep. FIG. 1 shows an overview example of the process. Input solids 100 are provided to the generative design solver, which converts the input solids 100 into a level set representation and operates on this level set representation to automatically produce new geometry that connects the input geometry. The new geometry is extracted from the 0-isosurface of the level set representation to produce an extracted mesh 110, which is partitioned into incident and organic parts 112, 114, respectively. T-Spline surfaces 120 are constructed for the organic part 114, and a final output watertight B-Rep 130 is composed from the input solids 100 and the organic T-Spline surfaces 120.

Note that the presently disclosed methods are applicable to generative designs that represent arbitrary combinations of material additions and subtractions and leverage the solver geometry representation. Moreover, although the example above references T-Spline surfaces 120, it will be appreciated that one or more different types of editable smooth surface representations can be used in respective implementations. For example, the surfaces 120, which are constructed for the organic part 114, can be Non-Uniform Rational Catmull-Clark Surfaces with T-junctions (T-NURCC) surfaces 120. Suitable variations in geometry formats that can be used for the editable smooth surface representations can include T-NURCCs, T-splines, LR B-splines, and/or hierarchical B-splines. In addition, the initially constructed, editable smooth surfaces 120 can merged (where possible) to produce a simpler patch layout 125 before composition with the input solids 100 to form the final output watertight B-Rep 130. For example, patches of initially constructed T-Spline and/or T-NURCC surfaces 120 can be merged to produce T-Spline and/or T-NURCC surfaces 125, as shown in FIG. 1.

In general, one or more aspects of the subject matter described in this specification can be embodied in one or more methods, including, obtaining, in a computer aided design program, a first three-dimensional model of an object to be manufactured, wherein the first three-dimensional model includes a polygon mesh resulting from a generative design process employing one or more input solids as one or more sub-spaces of an optimization domain of the generative design process, the one or more input solids being in a boundary representation format; partitioning, by the computer aided design program, the polygon mesh into a first portion that is incident with the one or more input solids and a second portion that is not incident with the one or more input solids; constructing, by the computer aided design program, one or more editable smooth surfaces for the second portion of the polygon mesh, wherein each of the one or more editable smooth surfaces has a globally smooth parameterization, which permits globally smooth free-form surface editing; modifying, by the computer aided design program, one or more boundaries of the one or more editable smooth surfaces to contact the one or more input solids at one or more contact curves that are homeomorphic to an unmodified boundary between the one or more modified smooth surfaces and the one or more input solids; and combining, by the computer aided design program, the one or more modified smooth surfaces with the one or more input solids to form a second three-dimensional model of the object to be manufactured, wherein the second three-dimensional model includes the one or more modified smooth surfaces in contact with one or more portions of the one or more input solids in the boundary representation format at one or more gap-free contact curves, wherein the second three-dimensional model is watertight, and wherein each of the one or more gap-free contact curves and each of the one or more modified smooth surfaces is editable using free-form modeling operations.

The one or more editable smooth surfaces are globally smooth in that their surface parameterization is smooth for the entirety of the surface. This is in contrast with being piece-wise smooth (often referred to as simply being smooth) which means that there are discontinuities in the surface parameterization, which can cause normal or curvature shape discontinuities. It will be appreciated that globally smooth surfaces are preferable for end users, as they allow simpler and more natural edits where smoothness remains unbroken as the user performs the edits. Thus, the method's ability to construct globally smooth surfaces for the second portion of the polygon mesh provides significant value in a computer aided design application. Moreover, the one or more constructed surfaces can be tightly fitted to the second portion of the mesh in that the globally smooth surface deviates from the mesh no further than an approximation tolerance specified by the application, and the ability of the method to satisfy this constraint can also be of significant value in a computer aided design application.

Further, watertight and editable character of the second three-dimensional model likewise provides significant value. Being watertight means there are no gaps where the modified and globally smooth surfaces are in contact with the input solids. Ensuring that the contact curves between the constructed (and modified) surfaces and the input solids are gap-free in the boundary representation format means that the input solids, the surfaces generated from the mesh of the generative design, and the contacts there between are all further editable using standard computer aided design and free-form modeling operations. This facilitates the use of the method with existing workflows employed by typical users of computer aided design applications.

This process of converting generative designs to watertight B-Rep models composed of the exact residual geometry of the input solids and editable (e.g., T-NURCC) surfaces avoids the need for a manual conversion process that relies on the skills of a user. The process achieves this while being able to handle any suitable number of keep-in and keep-out solids as generative design geometry constraints. Moreover, the produced watertight 3D models allow the generative designs to be readily used in downstream workflows (e.g., setting up assembly constraints, simulation analyses, performing parametric edits, etc.) which can accelerate the path to manufacturing and can reduce the product time to market. Thus, the disclosed systems and techniques enable engineers to rapidly obtain useful CAD models of any number of generative designs computed by a variety of algorithms, settings and iterations.

The generative design process can employ a volumetric (e.g., tetrahedral or hexahedral) mesh method, a level set method, or an unknown or proprietary method to create the generative design for the object (provided a distance representing the accuracy of the method is known). The polygon mesh can be a triangle mesh, either originally or by conversion thereto, coinciding with a boundary of the generative design. The partitioning can include assigning triangles to the first portion based on incidence data determined in accordance with generative design information associated with an accuracy of the generative design process. For example, for a generative design process that employs a level set method, the generative design information used can be grid cell containment information, and the method can check for input solids that intersect the grid cell. In general, the partitioning can include assigning triangles to the first portion based on incidence data determined for the vertices of the triangles, wherein some vertices are determined as incident with one or more input solids, based on a computation specific to the generative design process and the input solid type. Further, a triangle can be assigned to the second portion when the triangle has at least one vertex that is not determined as being incident with an input solid.

Each vertex of the polygon mesh can be assigned as incident to one or more solids based on processing a level set representation (when a level set method is used for the generative design process) or based on sampling (e.g., at the beginning of the generative design process, each vertex on the boundary of the volumetric mesh can be assigned as incident to one or more input solids whose surface is sampled to compute the vertex position). Further, the generative design information can be distance information, and the assigning can include assigning triangles to the first portion based on a threshold distance between vertices of the triangles and the one or more input solids, wherein a vertex of a triangle is treated as being incident with an input solid when the vertex is contained by or within the threshold distance of a surface of the input solid, and the threshold distance corresponds to a discretization accuracy of the triangle mesh's representation of the generative design created by the generative design process, even when the details of how the generative design process operates are unknown, but the accuracy of the generative design process is known. Thus, each vertex can be assigned as incident to one or more solids which contain the vertex within a distance threshold from their boundary, wherein the distance threshold is equal to the known accuracy of the generative design process.

The partitioning can include: checking for any non-manifold boundary vertices that (i) lie on a boundary between the first portion and the second portion and (ii) connect more than two boundary edges that lie on the boundary between the first portion and the second portion; reassigning one or more incident triangles, which include such non-manifold boundary vertices, from the first portion to the second portion; and iteratively repeating the checking and the reassigning until no non-manifold boundary vertices remain. Further, the partitioning can include relaxing a boundary shape formed by boundary edges that lie on a boundary between the first portion and the second portion by at least in part shifting boundary vertex positions towards their averages to decrease angular and length deviations on the boundary shape.

The one or more editable smooth surfaces can be one or more T-Spline surfaces, and the constructing can include: adding regularity constraints on any boundary vertices with a flat interior surface angle; applying boundary curve tangent direction propagation along boundary edges that lie on a boundary between the first portion and the second portion; applying a globally continuous map computation method, aligned with principal curvatures in anisotropic regions, scaled according to local curvatures, quantized to obtain a quad partitioning of the map image; applying a global map relaxation to improve smoothness of the global quad partitioning; and applying a global T-Spline surface approximation method that contains an approximation error of the second portion of the mesh. Applying the global T-Spline surface approximation method can involve, in particular, containing the approximation error of the second portion of the mesh at a boundary between the two portions of the mesh, within an approximation tolerance specified by the application.

The modifying can include: pulling at least one boundary of the one or more editable smooth surfaces toward at least one of the one or more input solids (including pulling the boundary inside the space contained by the input solid) by applying a gradient descent method for a distance function for the input solid evaluated for the pulled boundary; setting a safety tolerance value for the modifying based on accuracy limitations of (i) an intersection algorithm employed by the modifying and/or (ii) the triangle mesh's representation of the generative design created by the generative design process; and iteratively adjusting the safety tolerance value to ensure the one or more contact curves of the one or more modified smooth surfaces with the one or more input solids are homeomorphic to the unmodified boundary. The combining can include using Boolean operations that function on solids and oriented sheets or using cellular modelling techniques.

The computer aided design program can include two or more programs that operate cooperatively on two or more separate computer processors. The method can further include providing, by the computer aided design program, the second three-dimensional model for use in manufacturing a physical structure corresponding to the object using one or more computer-controlled manufacturing systems. The providing can include saving the second three-dimensional model to a permanent storage device for use in manufacturing the physical structure corresponding to the object using the one or more computer-controlled manufacturing systems. The one or more computer-controlled manufacturing systems can include an additive manufacturing machine, and the providing can include: generating toolpath specifications for the additive manufacturing machine using the second three-dimensional model; and manufacturing at least a portion of the physical structure corresponding to the object with the additive manufacturing machine using the toolpath specifications generated for the additive manufacturing machine.

One or more other aspects of the subject matter described in this specification can be embodied in one or more systems that include: a non-transitory storage medium having instructions of a computer aided design program stored thereon; and one or more data processing apparatus able to run the instructions of the computer aided design program to perform any of the methods. The system(s) can include an additive manufacturing machine, wherein the one or more data processing apparatus are able to run the instructions of the computer aided design program to generate toolpath specifications for the additive manufacturing machine from the second three-dimensional model, and manufacture at least a portion of the physical structure corresponding to the object with the additive manufacturing machine using the toolpath specifications. Moreover, one or more aspects of the subject matter described in this specification can be embodied in one or more non-transitory computer-readable media encoding a computer aided design program operable to cause one or more data processing apparatus to perform any of the methods.

Particular embodiments of the subject matter described in this specification can be implemented to realize one or more of the following advantages. Rather than using a specialized solver that processes input solid B-Reps directly and outputs restricted type of B-Rep geometry (e.g., lattice structures) instead of a mesh, more versatile generative design solvers that produce mesh outputs can be used, which provides the ability to generate more varied and useful shapes that optimize for arbitrary physical criteria. Further, violations of keep-in and keep-out constraints, which often result from unrestricted global approximation schemes for converting a generative design mesh into a globally smooth subdivision or spline surface, can be avoided, along with any need to repair such violations with separately applied Boolean operations, the application of which to resolve such issues is unreliable and results in poor quality outcomes. Thus, new and unique geometry for a generative design can be produced to meet a wide variety of design requirements, without user input or editing being necessary, where the new geometry connects smoothly with the input geometry provided to the generative design process.

Using the systems and techniques described herein to convert a generative design mesh into an editable, watertight B-Rep can facilitate downstream editing and processing of the generatively designed 3D model (e.g., fillet or shell operations) where such downstream editing and processing often requires precise mathematical geometry and cannot work effectively with generative design meshes that have been embedded with a B-Rep. Moreover, the conversion process can be fully automatic in that manual efforts are not required to align smooth surfaces of the input solids to the processed mesh geometry to produce geometry results that accurately represent the residual input solid surfaces in the generative design, even for complex, feature-rich shapes, which are often present in generative designs. This saves time in the design process, which facilitates the use of generative design techniques by reducing the costs of creating final, manufacturable designs.

The details of one or more embodiments of the subject matter described in this specification are set forth in the accompanying drawings and the description below. Other features, aspects, and advantages of the invention will become apparent from the description, the drawings, and the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows an overview example of a generative design process that results in an editable, watertight B-Rep.

FIG. 2 shows an example of how generative design solvers introduce a loss of surface precision due to the limitations of the target representation.

FIG. 3 shows another example of such loss of surface precision and how this can cause part interferences.

FIG. 4 shows an overview example of a simple generative model that results in a final generative B-Rep.

FIGS. 5A, 5B and 5C show an overview example of 2D level set incidences from a keep-in solid, a keep-out solid, and a seed solid.

FIG. 6 shows an example of mesh subsets constructed for the input solids of FIG. 1.

FIG. 7 shows an example of how a non-manifold boundary vertex is eliminated.

FIG. 8 shows an example of boundary relaxation leading to high-quality contact geometry between the organic surfaces and an input solid.

FIG. 9 shows examples of a high genus (88 and 54) generative design B-Reps generated using the fully automatic method of the present disclosure.

FIG. 10 shows an example of a boundary vertex with a flat interior surface angle.

FIG. 11 shows an example of boundary relaxation after added regularity constraints on all boundary vertices with a flat interior surface angle and applied boundary tangent direction propagation.

FIG. 12 shows an example of an organic boundary surface before and after the pull modification that results in a homeomorphic curve.

FIG. 13 shows an example of a process for composing a watertight B-Rep.

FIG. 14 is a schematic diagram of a data processing system including a data processing apparatus.

FIG. 15 shows an example of a process to convert mesh geometry to a watertight boundary representation for an object to be manufactured.

FIG. 16 shows an example of a process to partition mesh geometry, generated by topology optimization of a CAD solid model, in which non-manifold boundary vertices are eliminated.

FIG. 17 shows an example of a process to partition mesh geometry, construct one or more editable smooth surfaces for an organic portion of the mesh geometry, and modify one or more boundaries of the one or more editable smooth surfaces.

Like reference numbers and designations in the various drawings indicate like elements.

DETAILED DESCRIPTION

1—Overview

The fully automatic method of the present disclosure can take as input the generative solver input solid B-Reps (called “input solids” or represented as {S_(i)}) and the output mesh (

) representing the generative design (

). To link

to {S_(i)}, the intermediate solver representation (e.g., level set or volumetric mesh) can also be processed. Alternatively, the solver representation accuracy error (e.g., the level set voxel grid edge length) can be supplied instead.

{S_(i)} designates sub-spaces of the optimization domain. ∂S_(i) denotes the solid boundary surface, and S_(i) ^(o) denotes the solid boundary interior. {S_(i)} can be of the following types: keep-in (S_(i) is completely contained by the generative design, i.e., S_(i)⊂

), keep-out (S_(i) ^(o) is outside of the generative design,

; ∂S_(i) can overlap), or seed (S_(i) is fully or partially inside the generative design,

).

Overlapping input solids of the same type are united, so without loss of generality, S_(i)∩S_(j)=Ø for every i,j of the same type. The union of all input solids (i.e., regardless of type) is denoted as

=US_(i).

={

,

,

} is a closed 2-manifold mesh approximating

, where

={V_(i)},

={E_(i)},

={T_(i)} are the mesh vertices, edges and triangles, respectively. If a non-triangular mesh is provided, quads and general polygons can be triangulated to form a triangular mesh.

Some embodiments of the fully automatic method of the present disclosure works as follows: (1) partition the generative design mesh into two subsets (regions): incident and organic, where the incident subset (region) corresponds to the input solid surfaces, and the organic subset (region) corresponds to the generative synthesis surface; (2) approximate the organic subset (region) with globally smooth and tightly fitting, editable “organic” surfaces; and (3) compose a watertight B-Rep by combining the input and organic surfaces.

FIG. 4 shows an overview example of a simple generative model that results in a final generative B-Rep. Input solids 400 and an input generative mesh 405 are received, and the input generative mesh 405 is partitioned into a mesh partitioning 410. This can involve building and incidence relation

from

to the input B-Reps {S_(i)}, and using

to determine the elements of

corresponding to each S_(i). One or more organic T-Spline surface(s) 415 (or another surface type in a suitable editable/locally refinable smooth surface format, e.g., T-NURCC) are generated for the organic part 412 of the mesh partitioning 410. This can involve approximating the organic region 412 of the partitioned mesh 410 by relaxing the boundary between the organic and incident regions, computing cross, size and field-guided quad parameterization of the organic region, and constructing the smooth surfaces {O_(i)} approximating the organic region 412. A final generative B-Rep model 420 is composed from the constructed, organic smooth surface(s) 415 and the input solids 400. This can involve pulling the boundaries of {O_(i)} in the interior of

, constructing contact curves between {O_(i)} and {S_(i)}, and composing a watertight B-Rep from {O_(i)} and {S_(i)}.

2—Mesh Partition

The output mesh

from the generative design solver is partitioned into a pair of disjoint triangle subsets

=

, where

represents the input solid B-Reps in

, and

represents the boundary surface of the “organic” material synthesized by the solver. Note that

denotes the union of disjoint sets. To compute this partition, an incidence relation (

:

→

({S_(i)})) is built using the solver geometry representation, where

({S_(i)}) is the power set of {S_(i)}, and

can map a mesh to zero, one or multiple input solids.

2.1—Incidence Data

Incidence data (“incidences”) is constructed linking the generative mesh to the input solids. The incidences are stored as one or more attributes per each mesh vertex considered a representative of an input solid surface. A vertex can be incident with multiple input solids.

Notably, it is not required that a representative vertex lie precisely on the incident input surface(s). The method of the present disclosure performs robustly when the vertex positions are displaced within the generative solver B-Rep discretization accuracy (e.g., level set grid edge size).

The incidence data construction varies on how the solver represents the input solids internally. Incidence extraction methods are proposed for two common solver representations: level set and volumetric mesh. In addition, a fallback distance-based algorithm is described, which can be applied to any generative output mesh if an incidence distance is provided.

2.1.1—Level Set Incidences

Level sets are one the most popular contemporary representations for generative design, used both in research work (Van Dijk, N. P., Maute, K., Langelaar, M., and Van Keulen, F., Level-set methods for structural topology optimization: a review, Structural and Multidisciplinary Optimization 48, 3, 437-472, 2013) and in the CAD industry (Autodesk Dreamcatcher, Project Dreamcatcher, Autodesk Research, https://autodeskresearch.com/projects/dreamcatcher). The solver output

is extracted by approximating the 0-isosurface ∂

using a contouring algorithm (such as in Lorensen, W. E. and Cline, H. E., Marching Cubes: a High Resolution 3D Surface Construction Algorithm, Proc. of ACM SIGGRAPH 87, 163-170, 1987; Kobbelt, L., Botsch, M., Schwanecke, U., and Seidel, H.-P., Feature Sensitive Surface Extraction from Volume Data. Proc. of ACM SIGGRAPH 01, 57-66, 2001; Ju, T., Lassasso, F., Schaefer, S., and Warren, J., Dual Contouring of Hermite Data, Proc. of ACM SIGGRAPH 02, 339-346, 2002) where

is the level set representation of the generative design. Each mesh vertex position is computed by combining the corner positions of the level set grid cell containing the vertex.

Mesh vertex incidences are constructed as the union of the grid cell corner incidences as follows: (1) construct the incidence set

(g_(k))={S_(i)|g_(k)∈S_(i)} for each grid point g_(k). The “point in solid” test uses the standard ray-surface intersection count algorithm (Chen, M. and Townsend, T., Efficient and Consistent Algorithms for Determining the Containment of Points in Polygons and Polyhedra, E G 1987—Technical Papers, Eurographics Association, 1987). For efficiency, only grid points participating in the mesh extraction need be tested (i.e., the corner points of the narrow band of cells intersecting ∂

; (2) if g_(k)∉

∧

(g_(k))={S_(i)} for a seed S_(i), the volume around g_(k) has been eroded from

, then set

(g_(k))={ε_(i)}, where ε⊆S_(i) is the “eroded” subset of S_(i); and (3) for each V_(i) extracted in a grid cell G_(j) with corners {g_(j,k)}_(k=0) ⁷, construct the incidence set

(V_(i))=∪_(k=0) ⁷

(g_(j,k)) by uniting the incidences of the cell corners.

FIGS. 5A, 5B and 5C show an overview example of 2D level set incidences from three input solids {A, B, C}: a keep-in solid 505 (represented using a dashed line), a seed solid 510 (represented using a dash-dot line), and a keep-out solid 515 (represented using a dash-dot-dot line). Incidence attributes are assigned to grid points on or inside a solid as shown in FIG. 5A. Organic material (O) is added and seed solid material (E) is subtracted by the solver as shown on the grid points in FIG. 5B (the grid is represented using dotted lines). Grid vertex attributes are propagated to mesh vertices extracted from each grid cell at 520 in FIG. 5C (the solid lines represent the boundary of the solver output, where the thicker solid lines correspond to the added organic material). Note that vertices extracted from purely additive organic cells do not have incidence attributes.

2.1.2—Volumetric Mesh Incidences

Volumetric meshes (e.g., tetrahedral and hexahedral meshes) are another commonly used generative design representation, especially popular in topology optimization applications (Brackett, D., Ashcroft, I., and Hague, R., Topology optimization for additive manufacturing, Proceedings of the solid freeform fabrication symposium, Austin, Tex., 348-362, 2011; Chen, X., Peng, D., and Gao, S., SVM-Based Topological Optimization of Tetrahedral Meshes, Proceedings of the 21st International Meshing Roundtable, Springer Berlin Heidelberg, Berlin, Heidelberg, 211-224, 2013). Incidence data extraction from the volumetric mesh

is straightforward since

≡∂

. Let

⊆

be the union of the input keep-in solids and seed solids.

is initialized by piecewise-linear sampling of

, (i.e.,

≅

). Hence, initially

≅∂

. During initialization, set ∀V_(i)∈

the incidence attribute

(V_(i))={S_(i)}, where ∂S_(j), S_(j)⊆

is the input solid boundary sampled to obtain the position of V_(i). The attributes persist during the generative optimization of

and are recovered from the final

≡∂

for all vertices that have not been either eroded or added by the solver.

2.1.3—Distance Incidences

The generative design provided may not be based on volumetric optimization, or the internal geometry representation may be unavailable or proprietary. In such cases, incidence data can be constructed given a distance d>0 representing the accuracy tolerance of the underlying solver representation.

In such cases, the incidence data is constructed as follows: ∀V_(i)∈

and ∀S_(j), compute D_(j)(V_(i)) where D_(j)( ) is the signed distance function of ∂S_(j), D_(j)(p)≤0 for p∈S_(j). Next, set

(V_(i))={S_(j)|D_(j)(V_(i))≤d} (i.e., the subset of input solids that contain V_(i) within d of their surface). If

(V_(i))={S_(j)}∧D_(j)(V_(i))<−d for a seed S_(j), set

(V_(i))={S_(j),ε_(i)} or Ø. For large |

| and |{S_(i)}|, a bounding hierarchy of

for proximity searches can be precomputed to improve efficiency (Ehmann, S. A. and Lin, M. C., Accurate and Fast Proximity Queries Between Polyhedra Using Convex Surface Decomposition, Computer Graphics Forum 20, 3, 2001; Alliez, P., Tayeb, S., and Wormser, 2018, 3D Fast Intersection and Distance Computation, CGAL User and Reference Manual, CGAL Editorial Board. 2018; Siemens, Collision Detection Manager (D-Cubed CDM)—Siemens PLM Software, https://www.plm.automation.siemens.com/en/products/open/d-cubed/cdm/index.shtml).

2.2—Partitioning

Incidence data is extended to the mesh triangles as follows: if all three vertices of a triangle T_(i)={V_(i), V_(j), V_(k)} are incident with some solid(s), construct the triangle incidence

(T_(i))=

(V_(i))∪

(V_(j))∪

(V_(k)). Otherwise, set

(T_(i))=Ø. Notably, if a triangle has at least one vertex that is organic, the entire triangle is considered organic, even if another vertex is incident with a solid.

From the triangle incidences, mesh subsets are constructed corresponding to each input solid S_(i)↔

_(i)={T_(i)|T_(i)∈

∧S_(i)∈

(T_(i))}. FIG. 6 shows an example of mesh subsets 600 constructed for the input solids 100 of FIG. 1. Notably,

_(i)∩

_(j)≠Ø if ∂S_(i)∩∂S_(j)≠Ø, and

_(i)=Ø if S_(i) is consumed by organic material. Next, the incident

=∪

_(i) and organic

=

\

parts are constructed to complete the partition

=

.

2.3—Organic Components

A pair of triangles T_(i) and T_(j) are edge-connected if they share an edge E_(k)=T_(i)∩T_(j). The elements {

_(i)} of the smallest partition

_(i)=

are referred to in disjoint, edge-path-connected subsets as the organic components of

. This partition is trivially computed by “flood-fill” through edge connections.

3—Organic Boundary

={E_(i)|E_(i)=T_(j)ΩT_(k)∧[(T_(j)∈

∧T_(k)∈

)∨(T_(j)∈

∧T_(k)∈

)]}⊂

is the subset of edges separating

and

. Thus,

is referred to as the organic boundary, and its elements are referred to as the organic boundary edges, or just boundary edges: this short-hand notation is not ambiguous since

is closed by definition.

3.1—Boundary Vertices

Two edges E_(i) and E_(j) are connected if they share a vertex V_(k)=E_(i)∩E_(j). V_(k) is referred to as boundary if E_(i)∈

∧E_(j)∈

. Most boundary vertices connect a single pair of boundary edges and are known as 2-manifold. However, occasionally there exist partitions where a vertex V_(k) is connecting multiple pairs of boundary edges (i.e., V_(k) is a non-manifold boundary vertex). Such vertices introduce complications in downstream processing that should be resolved by special case handling.

FIG. 7 shows an example of how a non-manifold boundary vertex 705 is eliminated; the configuration is repaired by slightly altering the partition to result in only manifold vertices 710. For all non-manifold vertices {V_(k)}, reassign all incident triangles {T_(j)|T_(j)∩{V_(k)}≠Ø∧T_(j)∈

} to

. {V_(k)} are no longer boundary, but now the organic component partition

_(i)=

should be recomputed, since the reassigned triangles introduce new edge connections in

which may connect previously disconnected subsets. This process can be iterated until all boundary vertices become 2-manifold. Often, only a few iterations are needed to complete the process. In addition, convergence is ensured for pathological input data as well, since the entire mesh is eventually reassigned to the organic region.

3.2—Boundary Curves

Considering the elements {

_(i)} of the smallest organic boundary partition

_(i)=

in path-connected, disjoint subsets, to compute {

_(i)}, trace the vertex connections using an arbitrary unprocessed boundary edge as a seed. The algorithm completes the current subset

_(i) when closing the traced edge sequence. This construction shows that {

_(i)} represent closed, piecewise-linear curves, and are referred to as the boundary curves of the partition

=

.

3.3 Boundary Relaxation

Next, as a precondition to further processing, the shape of the boundary curves {

_(i)} can be relaxed to reduce jaggedness and length difference between adjacent boundary edges. This step is important for obtaining high quality, simpler quad-maps, which in turn lead to improved editability of the output organic surfaces.

The unrestricted version of piece-wise linear relaxation is well known as curve smoothing (Chaikin, G. M., An algorithm for high speed curve generation, Computer Graphics and Image Processing 20, 3, 346-349, 1974; Taubin, G., A signal processing approach to fair surface design, Proc. of ACM SIGGRAPH 95, 351-358, 1995). However, to avoid the shape shrinkage caused by such algorithms, curve relaxation is restricted to the surface of

and works as follows, summarized as (1) remeshing and (2) smoothing:

-   -   (1) Adaptively remesh a small channel of triangles around         to reduce adjacent boundary edge length differences. The channel         can include all triangles that are in the two-ring neighbourhood         of the boundary vertices, but alternative definitions are also         applicable. Remesh by applying the curvature-adaptive algorithm         (e.g., as described in Alliez, P., Ucelli, G., Gotsman, C., and         Attene, M., Recent Advances in Remeshing of Surfaces, 2005) and         refine the adjacent mesh triangles to conform to the changes.     -   (2) Smooth         by applying the surface-restricted curve smoothing algorithm         (e.g., as described in U.S. Publication No. 2013/0300735), which         iteratively decreases angular and length deviations on the         boundary curve by shifting the boundary vertex positions towards         their averages.         Note that the step of remeshing is not strictly required, but it         can lead to much better relaxation outcomes, mostly because the         improved mesh sampling reduces significantly the adjacent         boundary edge length differences.

FIG. 8 shows an example of boundary relaxation leading to high-quality contact geometry between the organic surfaces and an input solid. The input mesh 805 before relaxation has a high-curvature organic boundary segment 810. The high-curvature organic boundary segment after relaxation 815 has a reduced adjacent boundary edge length difference. Lastly, the input solid 800 is shown with an organic surface 820 (e.g., a T-Spline surface) constructed for the relaxed input mesh 805.

4—Organic Surfaces

Next, a construction is presented of a set of editable smooth surfaces {O_(i)}, one per organic component {

_(i)|

_(i)=

}. As the fully automatic method of the disclosed subject matter applies identically for each component

_(i)→O_(i), the component index i is omitted to simplify the notation.

The editable surface representation used can be T-Splines and/or T-NURCCs (Sederberg, T. W., Zheng, J., Bakenov, A., and Nasri, A., T-splines and T-NURCCs, Proc. of ACM SIGGRAPH 03, 477-484, 2003). T-Splines provide a map atlas of C² continuous quad patches {Q_(i)} covering the represented shape and a conforming quad control mesh

fully defining the surface geometry. The map atlas is useful to apply general CAD algorithms such as surface-surface intersections, while quad control meshes are one of the most popular tools for organic shape editing employed by industry designers.

T-Splines are capable of local T-junction insertion without reparameterization (Sederberg, T. W., Cardon, D. L., Finnigan, G. T., North, N. S., Zheng, J., and Lyche, T., T-spline simplification and local refinement, Proc. of ACM SIGGRAPH 04, 276-283, 2004). Hence, the deviation from

can be efficiently reduced by adding further degrees of freedom only where needed (Li, W.-C., Ray, N., and Levy, B., Automatic and Interactive Mesh to T-Spline Conversion, Proc. of the Symposium on Geometry Processing, 191-200, 2006). For applications where T-Splines are undesirable, the output surface can be converted to a G¹/G² continuous non-uniform rational basis spline (NURBS) network using per-patch approximation, or a C² Catmull-Clark subdivision surface (Catmull, E. and Clark, J., Recursively generated B-spline surfaces on arbitrary topological meshes, Computer Aided Design 10, 6, 350-355, 1978) by extending all T-joints.

T-NURCCs can also be used and provide the following useful properties: (1) the surface is defined by a quad control mesh, a very popular tool for shape editing employed by industry designers; (2) local refinement (Sederberg, T. W., Cardon, D. L., Finnigan, G. T., North, N. S., Zheng, J., and Lyche, T., T-spline simplification and local refinement, Proc. of ACM SIGGRAPH 04, 276-283, 2004) allows for error reduction by adding control points only where needed (Li, W.-C., Ray, N., and Levy, B., Automatic and Interactive Mesh to T-Spline Conversion, Proc. of the Symposium on Geometry Processing, 191-200, 2006; Wang, Y. and Zheng, J., Adaptive T-spline surface approximation of triangular meshes, 6th International Conference on Information, Communications and Signal Processing, ICICS, IEEE, 1-5, 2007); (3) general CAD algorithms (e.g., intersection, offset) can access the geometry as an atlas of C² continuous quad patches; and (4) the surface can be readily converted to a G¹ continuous NURBS network for export to legacy CAD formats.

To obtain a quad atlas (or a quad partition) of the organic shape suitable for defining a meaningfully aligned control mesh (e.g., by fitting a T-Spline surface) a quantized global parameterization, such as the Integer Grid Map (IGM), can be computed (Bommes, D., Campen, M., Ebke, H.-C., Alliez, P., and Kobbelt, L., Integer-grid maps for reliable quad meshing, ACM Transactions on Graphics 32, 4, 1, 2013; Campen, M., Bommes, D., and Kobbelt, L., Quantized global parametrization, ACM Transactions on Graphics 34, 6, 1-12, 2015): ϕ:

→Ω⊂

². This map has the following valuable properties:

(1) No need to specify a cut network for the high genus organic forms often present in generative designs. (FIG. 9 shows examples 900, 910 of a high genus (88 and 54) generative design B-Reps generated using the fully automatic method of the present disclosure.) Instead, only a small number of cone singularities are required (Ray, N., Li, W. C., Levy, B., Sheffer, A., and Alliez, P., Periodic Global Parameterization, ACM Trans. Graph., ACM, 1460-1485, 2006), which can be obtained from a smooth, curvature tensor-aligned cross-field (Bommes, D., Zimmer, H., and Kobbelt, L., Mixed-integer quadrangulation, ACM Transactions on Graphics 28, 2009).

(2) Map singularities are mapped to integer points, and the image boundary ϕ:

→∂Ω consists of integer isolines, which allows the extraction of the quad partition {Q_(i)|∪Q_(i)=Ω, Q_(i) ^(o)∩Q_(j) ^(o)=Ø} (Bommes, D., Campen, M., Ebke, H.-C., Alliez, P., and Kobbelt, L., Integer-grid maps for reliable quad meshing, ACM Transactions on Graphics 32, 4, 1, 2013).

(3) The quad mesh edges can be aligned along the shape principal curvatures by computing a smooth cross field (Bommes, D., Zimmer, H., and Kobbelt, L., Mixed-integer quadrangulation, ACM Transactions on Graphics 28, 2009).

(4) Shapes containing features of vastly varying sizes can be represented efficiently by specifying an adaptive size-field.

Equipped with ϕ:

→Ω and its inverse ϕ⁻¹: Ω→

, next a construction of an organic T-spline surface fitting

is presented.

4.1—Cross-Field

The first step of the construction of an organic T-spline surface fitting

is to specify the desired edge orientation of the organic surface editable quad control mesh. As shown in Alliez, P., Cohen-Steiner, D., Devillers, O., Levy, B., and Desbrun, M., Anisotropic polygonal remeshing, Proc. of ACM SIGGRAPH 03, 485-493, 2003, edges sampled along the principal curvature directions (away from isotropic points) match closely human-designed control meshes, provide optimal approximation, naturally represent symmetries, and allow meaningful shape deformations when used as a tool for surface editing. Therefore, following the established mixed-interval quadrangulation (MIQ) method (Bommes, D., Zimmer, H., and Kobbelt, L., Mixed-integer quadrangulation, ACM Transactions on Graphics 28, 2009; U.S. Patent Publication No. 2012/0029882), a globally smooth cross-field matching the principal curvature directions on

(away from isotropic regions) is computed to specify the desired edge orientation of the quad mesh. Alternative curvature-aligned cross-field computation algorithms (e.g., Knöppel, F., Crane, K., Pinkall, U., and Schröder, P., Globally optimal direction fields, ACM Transactions on Graphics 32, 2013) are also applicable at this stage. To estimate curvature tensors on

, the method in Restricted Delaunay Triangulations and Normal Cycle (Cohen-Steiner, D. and Morvan, J.-M., Restricted Delaunay triangulations and normal cycle, 19th Annu. ACM Sympos. Comput. Geom., 237-246, 2003) is applied, but other mesh curvature estimation methods are applicable as well, (e.g., Meyer, M., Desbrun, M., Schröder, P., and Barr, A. H., Discrete Differential-Geometry Operators for Triangulated 2-Manifolds, H.-C. Hege and K. Polthier, eds., Visualization and Mathematics III, Springer-Verlag, Heidelberg, 35-57, 2003; Cazals, F. and Pouget, M., Estimating differential quantities using polynomial fitting of osculating jets, Computer Aided Geometric Design 22, 121-146, 2005; Grinspun, E., Gingold, Y., Reisman, J., and Zorin, D., Computing discrete shape operators on general meshes, Computer Graphics Forum 25, 547-556, 2006).

The computed cross-field consists of a pair of orthogonal directions ∀T_(i)∈

, representing the desired quad edge alignment, and contains a small number of singularities assigned to vertices where the field flow bifurcates. Since singularities break the quad edge flow, affecting the editability of O, a few adjustments are made to reduce them at

.

First, add regularity constraints on all boundary vertices with a “flat” interior surface angle

$\left\{ {V_{i}\left. {\frac{\pi}{2} < {\sphericalangle\left( V_{i} \right)} < \frac{3\pi}{2}} \right\}} \right.$

to prevent the computation from placing singularities on them. Due to the boundary relaxation step carried out in Section 3.3, vertices where this condition is violated are very few and far in-between. FIG. 10 shows an example of a boundary vertex 1005 with a flat interior surface angle.

Second, apply boundary curve tangent direction propagation in a small channel along

, replacing the estimated principal curvature directions. This reinforces the boundary structure by aligning the cross-field to the boundary directions within the channel. The channel size is set automatically to match the expected local control mesh edge length.

FIG. 11 shows an example of boundary relaxation after added regularity constraints on all boundary vertices with a “flat” interior surface angle and applied boundary tangent direction propagation. Relaxation on the mesh boundary 1105 allows regularity constraints almost on the entire organic boundary without causing map distortion, leading to very regular easily editable organic surface boundaries 1110. These modifications lead to a simple, as regular as possible, quad structure along the control mesh boundary allowing improved outcomes when constructing contact curves between O and {S_(i)}.

4.2—Size-Field

Generative shapes are often composed of features of vastly different sizes. To avoid wasteful control mesh complexity on large-scale features and improve editability, a method can be applied to compute an anisotropic adaptive size-field that specifies the control mesh edge length sizes to cover adequately smaller features and avoid overrepresentation of larger features. An anisotropic size-field can be specified along the cross-field directions. The desired edge lengths (d_(i,u), d_(i,v)) ∀T_(i)∈

can be set from Equation (6) in Alliez, P., Cohen-Steiner, D., Devillers, O., Levy, B., and Desbrun, M., Anisotropic polygonal remeshing, Proc. of ACM SIGGRAPH 03, 485-493, 2003:

${{d_{i,t}\left( \kappa_{i,t} \right)} = \sqrt[2]{\in_{t}\left( {{\frac{2}{\kappa_{i,t}} -} \in_{t}} \right)}},{t = \left\{ {u,v} \right\}},$

where (κ_(i,u), κ_(i,v)) are the estimated curvatures along the cross-field direction on T_(i), and (∈_(u), ∈_(v)) are automatically chosen to retain the smallest shape features by ensuring ∈_(t)<2/max_(i) K_(i,t).

4.3—Parametrization

Applying the injective global parameterization method in Bommes, D., Campen, M., Ebke, H.-C., Alliez, P., and Kobbelt, L., Integer-grid maps for reliable quad meshing, ACM Transactions on Graphics 32, 4, 1, 2013 modified to use the quantitation algorithm in Campen, M., Bommes, D., and Kobbelt, L., Quantized global parametrization, ACM Transactions on Graphics 34, 6, 1-12, 2015, a quantized globally continuous map ϕ:

→Ω is obtained, which conforms to the cross-fields and size-fields computed previously. The properties of this map allow an immediate definition of a T-Spline surface O parameterized over the quad atlas {Q_(i)|∪Q_(i)=Ω, Q_(i) ^(o)∩Q_(j) ^(o)=Ø}.

The map inverse ϕ⁻¹: Ω→

is computed and relaxed to improve the singularity positions and reduce distortion; ϕ⁻¹ is used to build the bijective correspondence η: O→

=ϕ⁻¹(O⁻¹), mapping the organic surface to the organic mesh through Ω.

4.4—Approximation

By providing η, a general T-Spline approximation method can be applied to compute a surface fitting

. Depending on the application requirements, different strategies for how to specify the approximation problem are available depending on certain conditions. (1) If simpler, easier to edit organic surfaces are preferable, the control mesh vertex positions can be computed by solving the linear min L²(

, O) problem without bounding the maximum deviation. In some implementations, O is represented as a Catmull-Clark surfaces as well. (2) If a tight fit of

is sought, the non-linear bound problem L^(∞)(

, O)<δ for a tolerance δ>0 is solved. In this case, the approximation algorithm can interleave L²(

, O) approximation with T-junctions refinement where

$\left. {\left\{ {{Q_{i}\underset{p \in Q_{i}}{{\max }}{O(p)}} - {{\mathbb{O}}(p)}} \right. > \delta} \right\}.$

In some implementations, the output is an adaptively refined T-NURCC surface (e.g., using an approach similar to that in Li, W.-C., Ray, N., and Levy, B., Automatic and Interactive Mesh to T-Spline Conversion, Proc. of the Symposium on Geometry Processing, 191-200, 2006). Since

approximates a smooth surface within the generative solver accuracy limits, δ is set accordingly (e.g., δ=√{square root over (3)}×the voxel grid edge length for level-set based solvers). (3) A restricted tight fit of

can be requested to guarantee surface accuracy near the joints with the input solids. In this case, L^(∞)(

B, ∂O)<δ is solved for the boundary control points, and the fitting in the interior is completed by solving min L²(

, O). In some implementations, an adaptively refined T-NURCC surface is computed, where the T-NURCC surface approximates the organic boundary tightly (solve L^(∞)(

, ∂O)<δ) but approximates the interior more loosely (solve min L²(

, O)) as a compromise between surface complexity and accuracy. For further details regarding such approximation approaches, see U.S. patent application Ser. No. 16/388,771, filed Apr. 18, 2019, and titled, “CONVERSION OF MESH GEOMETRY TO WATERTIGHT BOUNDARY REPRESENTATION”, which application is incorporated herein by reference.

5—Boundary Contact

For the composed output B-Rep to be watertight, the organic surface boundaries ∂O=∪∂O_(i) should be contained in the volume

=US_(i), i.e., ∂O⊂

. Hence, a pull modification is applied to the organic surface boundaries {O_(i,j)} to construct the corresponding B-Rep contact curves {C_(i,j)=∂O_(i)∩S_(j)}. This ensures the successful outcome of the subsequent watertight B-Rep composition. This is identical for all organic surface boundary curves {∂O_(i,j)} so the index pair i,j is omitted.

FIG. 12 shows an example of an organic boundary surface 1200 before and after the pull modification that results in a contact curve homeomorphic to the corresponding boundary curve. A generative design with a low sampling accuracy causes a large visible gap 1205 between the boundary organic surface 1200 and the contact input solid 1210. The pull algorithm is applied on the organic surface 1200 to remove the gap, as shown at 1215. The intersection curve is homeomorphic to the corresponding organic boundary curve, which allows the construction of a watertight output B-Rep 1220.

5.1—Boundary Correspondence

Following the boundary restriction ∂η: ∂O→

of the bijective correspondence η constructed in Section 4.3, the solid S incident with

is determined and correspondingly with ∂O. In some implementations, the solid S incident with

is determined from the mesh partitioning computed in section 2.2 above. If multiple adjacent solids of different types are incident with the same boundary curve, then S is the union of these multiple adjacent solids. By construction, such solids have overlapping boundaries and therefore their union defines a valid, path-connected solid. From the IGM, the corresponding organic surface boundary can be found, ϕ:

→∂O.

5.2—Boundary Pull

Let D_(j)( ) be the signed distance of ∂S, D(p)≤0 for p∈S; ∂O is “pulled” so that

${{D\left( {\partial O} \right)} = {{\max\limits_{p \in {\partial O}}{D(p)}} \leq \xi}},$

where ξ<0 is a negative safety tolerance adapted to ensure that the intersection C=O∩∂S and ∂O are homeomorphic (see Section 5.3 below). Having D(∂O)≤ξ<0 implies ∂O⊂S⁰, therefore the contact between S and O is watertight.

Using the NURBS parameterization c(t)=Σ_(i)c_(i)B_(i)(t) of ∂O, where {B_(i)} are the NURBS basis functions along ∂O and {c_(i)} are the corresponding surface boundary control points, evaluate

${D\left( {\partial O} \right)} = {{\max\limits_{p \in {\partial O}}{D(p)}} = {\max\limits_{t}{{D\left( {c(t)} \right)}\mspace{14mu}{and}\mspace{14mu}{\nabla{D\left( {\partial O} \right)}}}}}$

with respect to {c_(i)}:

${\nabla{D\left( {\partial O} \right)}} = {\left( {\text{...}\mspace{14mu},\frac{{\partial\max\limits_{t}}{D\left( {c(t)} \right)}}{\partial c_{i}},\ldots} \right).}$

Next, apply the gradient descent method to move {c_(i)} along −∇D(∂O) until D(∂O)≤ξ.

To implement efficiently the evaluations of D(c(t)), a hierarchical space parametrization around

is used. The line search

$\min\limits_{t}{D\left( {c(t)} \right)}$

can be sped up by maintaining a dense uniform sample grid {t_(j)} over the domain of c(t), caching the basis function values {B_(i)(t_(j))}. Finally, loosely approximating the partial derivatives ∂D(∂O)/∂c_(i) with the unit normal {right arrow over (n)}_(i) at the projection point q_(i)∈∂S of c_(i) works quite well and reduces significantly the computation time. If q_(i) happens to lie on a sharp edge or a corner vertex, define n_(i) as the average of the surface normals incident with q_(i).

The pull process typically converges quickly in a few iterations. Occasionally, cases are encountered where the algorithm fails to pull small segments of the boundary inside S within a certain iteration number (e.g., 100). In such cases, the segments can be corrected by bisecting them by local insertion (Sederberg, T. W., Cardon, D. L., Finnigan, G. T., North, N. S., Zheng, J., and Lyche, T., T-spline simplification and local refinement, Proc. of ACM SIGGRAPH 04, 276-283, 2004) of a new boundary vertex and rerunning the pull algorithm. The boundary pull and refinement can be iterated until convergence; in most instances of this issue, only a few new vertices and refinement steps are needed.

5.3—Safety Tolerance

In practice, due to accuracy limitations of the underlying geometry representations, surface-surface intersection implementations may fail to compute a correct intersection result if the boundary of one of the surfaces is nearly coincident with the other surface. Therefore, if ∂O is nearly coincident with ∂S, the computed intersection C=O∩∂S may not be homeomorphic to ∂O.

To handle such situations, the pull modification can be initially set to ξ=−1×(the underlying accuracy tolerance used by the intersection algorithm computing C=O∩∂S). Once the pull is complete, compute C=O∩∂S and check if it is homeomorphic with ∂O. If this is not the case, the safety tolerance can be raised by a scalar value (e.g., ξ→2ξ) and pulling can be resumed. Applying this strategy iteratively allows accuracy limitations to be handled robustly. As a performance optimization, it may be preferable to initialize |ξ| with a larger initial tolerance if it is known that the underlying surface accuracy is limited.

5.4—Tolerant Modelling

Some B-Rep modelling kernels, (e.g., Siemens Parasolid) support “tolerant” edges and vertices representing contact curves and points for non-intersecting or partially-intersecting surfaces (Jackson, D. J., Boundary representation modelling with local tolerances, Proceedings of the third ACM symposium on Solid modeling and applications—SMA '95, ACM Press, 247-254, 1995). If tolerant modelling capabilities are available, a distance μ>0 representing the largest supported tolerance bounding the contact surfaces gap can be specified. Then, set ξ=μ>0 to pull ∂O within μ from S. Hence, there is no need to compute C=O∩∂S, as C=∂O=O∩S_(μ) is prescribed, where S_(μ)={p|D(p)≤μ}.

5.5—Organic Shape Change

Incidence construction in Section 2.1 implies that

is contained within a distance d>0 from S, where d≈the generative solver accuracy. Consequently, D(∂O)≤2d initially if the fitting strategies L^(∞)(

, O)<d or L^(∞)(

, ∂O)<d in Section 4.4 are applied. Therefore, the shape change introduced by a “pull” of ˜2d is within the design accuracy tolerance and does not affect the validity of the generative result.

If the simpler problem min L²(

, O) in Section 4.4 is solved instead, the initial D(∂O) is unbounded. However, in practice ∂O is sufficiently close to S for the introduced changes to be acceptable. B-Rep modelling computations are many orders of magnitude more accurate than the generative representation sampling tolerance. Hence, |ξ|<<d and the shape change caused by the additional safety tolerance pull D(∂O)≤ξ<0 is negligible.

6—Composition

Next, a watertight B-Rep representing the generative design is composed by combining the organic surfaces {O_(i)} and the input solids {S_(i)}. Contact curves for all boundaries {∂O_(i)} are now constructed, so it only remains to determine what volume must be assigned to the output generative B-Rep.

So far, keep-in and keep-out input solids have not been disambiguated. Define the subsets

=

∪

∪

where

,

and

are the keep-in, keep-out and seed input solids, respectively.

6.1—Surface Boolean

and {O_(i)} can be combined using existing well-established Boolean operations that function on solids and orientated sheets (Granados, M., Hachenberger, P., Hert, S., Kettner, L., Mehlhorn, K., and Seel, M., Boolean Operations on 3D Selective Nef Complexes Data Structure, Algorithms, and Implementation, Algorithms—ESA 2003: 11th Annual European Symposium, Springer, 174-186, 2003; Hachenberger, P. and Kettner, L., 3D Boolean Operations on Nef Polyhedra, CGAL User and Reference Manual, CGAL Editorial Board, 2018). One way to combine

and {O_(i)} includes the following steps: (1) combine the surfaces {O_(i)} into a single (disjoint) orientated sheet P=

O_(i); and (2) perform a Boolean unite

=

∪P. Because by construction of ∂P⊂

, the operation forms a valid solid

; (3) subtract the keep-out solids to yield the desired output B-rep

\

.

6.2—Cellular Composition

Alternatively, cellular modelling techniques, which are well established in the art (Amon, D., A cellular decomposition algorithm for semialgebraic sets, Springer, Berlin, Heidelberg, 301-315, 19) can be used. This has the following advantages: Boolean operations on oriented sheets and partial solids have always proved confusing and counterintuitive both for users and developers; and the cellular approaches yield an intermediate cell decomposition of the generative design, which can be used to customize the result or diagnose failures due to bad input.

6.2.1—Cell Creation

A “universe” void-less solid

is constructed (e.g., as an expanded bounding box or sphere) that strictly contains all input solids and organic surfaces

∪{O_(i)}⊂

.

is partitioned into path-connected solid cells {U_(i)|∪U_(i)=

, U_(i) ^(o)∩U_(j) ^(o)=Ø} bounded by the organic surfaces {O_(i)}, the solid surfaces {∂S_(i)}, and the universe surface ∂

, i.e., {∂U_(i)}={O_(i)}∪{∂S_(i)}∪∂

. By construction, there is a single cell U₀ containing the universe boundary ∂

⊂∂U₀: discard U₀, and the remaining cells will satisfy {∂U_(i)}={O_(i)}∪{∂S_(i)}.

6.2.2—Cell Classification

FIG. 13 shows an example of a process for composing a watertight B-Rep. Input solids 1300 and a mesh partitioning 1305 are used to control combining an organic T-Spline surface 1310 (or other surface type, e.g., T-NURCC surface) with the input solids 1300 to form a watertight B-Rep 1315. Each U_(i) is determined as either inside or outside of the final generative B-Rep. If U_(i)⊆S_(j) for some S_(j)⊆

, U_(i) is classified as inside, otherwise as outside. For all other cells, the cell boundary ∂U_(i) is inspected.

Let {F_(ij)} be the surface face partition of ∂U_(i), {F_(ij)|∪F_(ij)=∂U_(i), F_(ij) ^(o)∩F_(ik) ^(o)=Ø}, where each face F_(ij) coincides with a path-connected subset of a single surface O_(k) or ∂S_(k): (1) if ∀F_(ij), F_(ij)⊂{∂S_(k)}, U_(i) is classified outside if it is a void of

, or inside otherwise, since then U_(i)⊆S_(j) ∈

; (2) if ∃F_(ij), F_(ij)⊆O_(k)∈{O_(k)}, and O_(k) has the same orientation as F_(ij), then the cell is provisionally classified inside; (3) if ∃F_(ij), F_(ij)⊆O_(k)∈{O_(k)}, and O_(k) has the opposite orientation of F_(ij), then the cell is provisionally classified outside; (4) if both (2) and (3) are true, then the cell is classified inside and a diagnostic indicating an invalid algorithm input is reported. (5) Otherwise, the provisional classification is adopted. Them, the output generative solid B-Rep is composed by uniting all inside cells {U_(i)}.

FIG. 14 is a schematic diagram of a data processing system including a data processing apparatus 1400 (also referred to as computer 1400) which can be programmed as a client or as a server. The data processing apparatus 1400 is connected with one or more computers 1490 through a network 1480. While only one computer is shown in FIG. 14 as the data processing apparatus 1400, two or more computers can be used. The data processing apparatus 1400 includes various software modules, which can be distributed between an applications layer and an operating system. These can include executable and/or interpretable software programs or libraries, including tools and services of one or more CAD programs 1404 that implement the systems and techniques described in this application. Thus, the CAD program(s) 1404 convert generative design meshes into editable and watertight B-Rep models, as described herein. Further, the CAD program(s) 1404 can provide additional functions and features, including implementing the generative design processes (e.g., a generative design solver that employs one or more level set methods to automatically create a 3D model design) and/or functions of Computer Aided Engineering (CAE), Computer Aided Manufacturing (CAM) and Computer Numerical Control (CNC) programs for additive manufacturing and/or subtractive manufacturing. The number of software modules used can vary from one implementation to another. Moreover, the software modules can be distributed on one or more data processing apparatus connected by one or more computer networks or other suitable communication networks.

The data processing apparatus 1400 also includes hardware or firmware devices including one or more processors 1412, one or more additional devices 1414, a non-transitory computer readable medium 1416, a communication interface 1418, and one or more user interface devices 1420. Each processor 1412 is capable of processing instructions for execution within the data processing apparatus 1400. In some implementations, the processor 1412 is a single or multi-threaded processor. Each processor 1412 is capable of processing instructions stored on the computer readable medium 1416 or on a permanent storage device such as one of the additional devices 1414. The data processing apparatus 1400 uses the communication interface 1418 to communicate with one or more computers 1490, for example, over the network 1480. Examples of user interface devices 1420 include a display, a camera, a speaker, a microphone, a tactile feedback device, a keyboard, a mouse, and virtual reality (VR) and/or augmented reality (AR) equipment. The data processing apparatus 1400 can store instructions that implement operations associated with the program(s) described herein, for example, on the computer readable medium 1416 or one or more additional devices 1414, which also contain non-transitory computer readable media such as non-transitory computer readable medium 1416, for example, one or more of a hard disk device, an optical disk device, a tape device, and a solid state memory device.

The system of FIG. 14 is usable to design and potentially manufacture physical structures, where CAD program(s) 1404 implement three-dimensional (3D) modeling functions and conversion of mesh geometry to a watertight boundary representation for a part to be manufactured. The mesh geometry can be obtained from different sources, but generally, the mesh geometry will be associated with one or more modelled solids that are in a boundary representation format. In some implementations, the system includes a 3D scanner (not shown) that scans a physical object to generate a mesh representation of the physical object, and the CAD program(s) 1404 can use this input mesh to generate the one or more modelled solids (e.g., B-Reps) by fitting regular geometrical shapes to the mesh, and the CAD program(s) 1404 can use the systems and techniques described herein to convert remaining portions of the mesh (those portions that are too complex to be modeled using regular geometrical shapes) to a boundary representation format (e.g., B-Reps) and connect them with the one or more modelled solids. In this example, the CAD program(s) 1404 include scanning and modelling functions.

In some implementations, the CAD program(s) 1404 implement one or more generative design processes that employ material or microstructure techniques and/or geometrical or macrostructure techniques for generative design (e.g., Solid Isotropic Material with Penalization (SIMP) and/or level-set methods for topology optimization). The one or more modelled solids can be produced in (or loaded into) the CAD program(s) using traditional 3D modelling techniques, and these modelled solid(s) (also referred to as input solid(s)) can be used as one or more sub-spaces of an optimization domain of a generative design process. Thus, the generative design process can output a mesh representing automatically generated geometry that is to connect with the modelled solid(s) used as input. Further, the CAD program(s) 1404 can implement physical simulation (finite element analysis (FEA) or other) and also manufacturing control functions, in various implementations.

As used herein, CAD refers to any suitable program used to design physical structures that meet specified design requirements, regardless of whether or not the program is capable of interfacing with and/or controlling specific manufacturing equipment. Thus, CAD program(s) 1404 can include CAE program(s), CAM program(s), etc. The program(s) 1404 can run locally on computer 1400, remotely on a computer of one or more remote computer systems 1490 (e.g., one or more third party providers' one or more server systems accessible by the computer 1400 via the network 1480) or both locally and remotely. Thus, a CAD program 1404 can be two or more programs that operate cooperatively on two or more separate computer processors in that a program 1404 operating locally at computer 1400 can offload processing operations (e.g., mesh conversion, generative design and/or physical simulation operations) “to the cloud” by having one or more programs 1404 on one or more computers 1490 perform the offloaded processing operations.

The CAD program(s) 1404 can present a user interface (UI) on a display device 1420 of the computer 1400, which can be operated using one or more input devices 1420 of the computer 1400 (e.g., keyboard and mouse). Various subsets of the input and output devices 1420 can be separate from or integrated with each other and/or with the computer 1400, such as in a tablet computer (e.g., a touch screen can be an input/output device 1420). Moreover, the computer 1400 can include or be part of a VR or AR system. For example, the input/output devices 1420 can include a VR/AR input glove and/or a VR/AR headset.

As noted above, the CAD program(s) 1404 implement 3D modeling functions, which means a 3D model can be built using the CAD program(s) 1404. The CAD program(s) 1404 can implement physical simulation (locally and/or by remote procedure call) to assist in building the 3D model. Physical simulations, such as FEA, Computational Fluid Dynamics (CFD), Acoustics/Noise Control, thermal conduction, and/or computational injection molding simulations are often integral components in CAD-based product development. The CAD program(s) 1404 can be used to build precise geometric descriptions of the design model, while physical simulations enable improved performance without time consuming physical testing.

The CAD program(s) 1404 can provide user interface elements that enable the user to specify inputs for physical simulation(s), such as materials and loading cases for the 3D model(s), where the loading cases define loads in different directions to be borne by a part being designed during use of the part. Thus, a user can interact with the UI of the CAD program(s) 1404, including producing a full mechanical problem definition for a part to be manufactured, so as to build and modify 3D model(s), which can be stored in 3D model document(s). As will be appreciated, many possible 3D models that can be designed using the systems and techniques described herein.

Moreover, the CAD program(s) 1404 can implement at least one generative design method (locally and/or by remote procedure call) which enables the CAD program(s) 1404 to generate one or more portions of the 3D model(s) automatically (or the entirety of a 3D model) based on design criteria, where the geometric design is iteratively optimized based on simulation feedback. Note that, as used herein, “optimization” (or “optimum”) does not mean that the best of all possible designs is achieved in all cases, but rather, that a best (or near to best) design is selected from a finite set of possible designs that can be generated within an allotted time, given the available processing resources. The design criteria can be defined by the user, or by another party and imported into the CAD program(s) 1404. For example, a design space, load cases, and design criteria can be obtained for the modelled object by the CAD program(s) 1404 by receiving user input, e.g., via UI on display device 1420.

The 3D model includes one or more modelled solids that are used as input (e.g., B-Reps that are preserve bodies input) to the generative design process, which generates a mesh therefrom in view of the boundary conditions set by the input geometry. Various generative design processes can be used to optimize the shape and topology of the mesh portion of the 3D model. The input solid(s) can be converted to mesh geometry for use as input to the generative design process, the mesh output from the generative design processes can include mesh portions that correspond to the input solid(s), and these portions can be removed to result in the organic mesh portion of the generated model. This mesh portion is then converted into an editable boundary representation format (e.g., B-Rep, T-spline, subdivision surface, and/or other computer 3D modelling formats) and connected to the modelled solid(s) to form a watertight model of the generatively designed object.

In addition, in some implementations, the CAD program(s) 1404 implement manufacturing control functions. Once the user is satisfied with a 3D model, the 3D model can be stored as 3D model document(s) and/or be used to generate another representation of the model (e.g., an .STL file for additive manufacturing). This can be done upon request by the user, or in light of the user's request for another action, such as sending the 3D model to additive manufacturing (AM) machine(s) 1495, or other manufacturing machinery, which can be directly connected to the computer 1400, or connected via a network 1480, as shown. This can involve a post-process carried out on the local computer 1400 or a cloud service to export the 3D model to an electronic document from which to manufacture. Note that an electronic document (which for brevity will simply be referred to as a document) can be a file, but does not necessarily correspond to a file. A document may be stored in a portion of a file that holds other documents, in a single file dedicated to the document in question, or in multiple coordinated files.

In any case, the CAD program(s) 1404 can provide a document (having toolpath specifications of an appropriate format) to the AM machine 1495 to produce the physical structure corresponding to the generatively designed 3D model. The AM machine 1495 can employ one or more additive manufacturing techniques, such as granular techniques (e.g., Powder Bed Fusion (PBF), Selective Laser Sintering (SLS) and Direct Metal Laser Sintering (DMLS)), extrusion techniques (e.g., Fused Deposition Modelling (FDM), which can include metals deposition AM). In some cases, the AM machine 1495 builds the physical structure directly, and in some cases, the AM machine 1495 builds a mold for use in casting or forging the physical structure. In addition, the user can save or transmit the 3D model for later use. For example, the CAD program(s) 1404 can store the document(s) that includes the 3D model.

In some implementations, the CAD program(s) 1404 implement manufacturing control functions for subtractive manufacturing (SM) machine(s) 1495 (e.g., a Computer Numerical Control (CNC) milling machine, such as a multi-axis, multi-tool milling machine) to be used in the manufacturing process. For example, the CAD program(s) 1404 can generate CNC instructions for a machine tool system 1495 that includes multiple tools (e.g., solid carbide round tools of different sizes and shapes, and insert tools of different sizes that receive metal inserts to create different cutting surfaces) useable for various machining operations. Thus, in some implementations, the CAD program(s) 1404 can provide a corresponding document (having toolpath specifications of an appropriate format, e.g., a CNC numerical control (NC) program) to the SM machine 1495 for use in manufacturing the physical structure using various cutting tools, etc.

In some implementations, the CAD program(s) 1404 provide instructions to build a workpiece in a first stage of manufacturing, e.g., using direct AM and/or using forging and/or casting methods, and the CAD program(s) 1404 also provide instructions to machine the workpiece, e.g., roughing and/or finishing operations, in a second stage of manufacturing, e.g., in a 3-axis CNC milling system in order to form the completed structure. In general, various different manufacturing systems and techniques can be employed, either alone or in combination, to produce a final structure, and the CAD program(s) 1404 can include suitable algorithms to generate toolpath specifications for one or more of these various systems to manufacture a part that has been designed using the systems and techniques described in this application.

FIG. 15 shows an example of a process to convert mesh geometry to a watertight boundary representation for an object to be manufactured. A first 3D model of an object to be manufactured is obtained 1505, e.g., by the CAD program(s) 1404. The first 3D model includes a polygon mesh associated with one or more modelled solids, e.g., a polygon mesh resulting from a generative design process employing one or more input solids (in a boundary representation format) as one or more sub-spaces of an optimization domain of the generative design process. The generative design process can employ a volumetric mesh method to create the generative design for the object. The generative design process can employs a level set method to create the generative design for the object. Moreover, the obtaining 1505 can include invoking the generative design process to produce the generative design or receiving the generative design from another process or source.

The polygon mesh can be a triangle mesh, either originally or by conversion thereto, but various types of mesh formats can be used, including tetrahedral or hexahedral meshes. Moreover, while the focus of this disclosure is on generative design, where the polygon mesh coincides with a boundary of the generative design, other implementations are possible. For example, the one or more modelled solids in the boundary representation format (e.g., B-Reps) can be regular geometric shapes that have been fit to a scanned mesh, rather than being modelled solid(s) used as input to a generative design process.

In addition, the process can optionally include a check 1510 (in the case that there are two or more input solids for the generative design process) to detect one or more gaps (between at least two of the two or more input solids) that are smaller than an accuracy of the generative design process. Generative design constraint setups occasionally contain very small gaps that are inadvertently left between adjacent input solids, usually of different types, e.g., keep-in or and keep-out solids. In practice, solvers ignore such gaps and “unite” the solids in their representation. This is especially evident in level set representations where it is often impractical to reduce the voxel grid size to capture tiny gaps. If ∂O intersects such gaps, the pull algorithm (see e.g., section 5.2 above) cannot converge as the small parts of ∂O inside the gaps cannot be pulled in

⁰. To resolve this issue, these small gaps can be detected 1510 in the generative setup, and the input B-Rep solids can be expanded 1515 to fill the gaps. This check and expansion is shown as occurring before the obtaining 1505 of the first 3D model, but this check and expansion can also be performed after the obtaining 1505 of the first 3D model in some implementations.

The polygon mesh is partitioned 1520, e.g., by the CAD program(s) 1404, into a first portion that is incident with the one or more input solids and a second portion that is not incident with the one or more input solids. Various approaches to this partitioning are possible, such as described above in section 2. In general, a particular polygon in the mesh need not be entirely contained by an input solid to be considered incident with the one or more input solids, i.e., to be considered a non-organic portion of the mesh, and a particular polygon in the mesh need not be entirely outside of all input solid(s) to be considered non-incident with the one or more input solids, i.e., to be considered an organic portion of the mesh.

In some implementations, the partitioning 1520 involves assigning triangles of the mesh to the first (incident) portion based on incidence data determined in accordance with generative design information associated with an accuracy of the generative design process. For example, the generative design information can include distance information, and the assigning 1520 can include assigning triangles to the first (incident) portion based on a threshold distance between vertices of the triangles and the one or more input solids, where a vertex of a triangle is treated as being incident with an input solid when the vertex is contained by or within the threshold distance of a surface of the input solid. The threshold distance corresponds to a discretization accuracy of the representation of the generative design created by the generative design process, e.g., the threshold can be set based on the level set grid cell size or the maximum distance between a volumetric mesh element discretization and the input B-Reps. Thus, the inherent fuzziness of the generative design output is accounted for in the partitioning 1520. Further detailed examples of the partitioning 1520 are provided above in sections 2.1, 2.2, and 2.3.

In addition, FIG. 16 shows an example of a process to partition mesh geometry, generated by topology optimization of a CAD solid model, in which non-manifold boundary vertices are eliminated. The process begins checking the triangles of the mesh to assign them to either a first (non-organic) portion of the mesh or a second (organic) portion of the mesh. The first portion of the mesh is “non-organic” in the sense that it corresponds to one or more smooth and precise mathematical surfaces, which can be one or more modelled solids provided as input to a generative design process, or be regular geometrical shapes fit to a mesh output of a scanner. The second portion of the mesh is “organic” in the sense that it represents a complex shape produced by a generative design process, or by a scanner that generates a shape that is not readily modelled using regular geometrical shapes fit to the mesh.

While mesh triangles remain to be assigned 1600, a check 1605 is made for each triangle to determine whether the triangle has at least one vertex that is not incident with any of the modelled solid(s). When a triangle has at least one vertex that is determined as not being incident with an input solid (or a generated solid) the triangle is assigned 1610 to the second (organic) portion. Otherwise, the triangle is assigned 1615 to the first (non-organic) portion of the mesh. Thus, a triangle can be assigned to the organic part of the mesh even when two of the three vertices of the triangle are contained by an input solid. Further, as explained elsewhere in this application, e.g., section 2.1 above, a vertex of a triangle need only be within a threshold distance of a modelled solid to be considered to be incident with the modelled solid. Thus, a triangle with no vertices contained by an input solid can be assigned to the non-organic (incident) part of the mesh if all three of those vertices are within the threshold distance set by the discretization accuracy (of the generative design process or of the scanner).

Once the triangles of the mesh have been assigned to either the first (incident/non-organic) portion or the second (organic/non-incident) portion of the mesh, and additional check and reassignment process can be employed as part of the partitioning process. A check 1620 can be made for any boundary vertices (i.e., vertices that connect boundary edges, which separate the two portions of the mesh) that are not 2-manifold (i.e., the vertex connects more than two boundary edges). Thus, checking 1620 for any non-manifold boundary vertices involves finding vertices that (i) lie on a boundary between the first portion and the second portion and (ii) connect more than two boundary edges that lie on the boundary between the first portion and the second portion. For further details, see section 3.1 above and in connection with FIG. 7.

For each such non-manifold boundary vertex found, one or more incident triangles that include the non-manifold boundary vertex is reassigned from the first (incident/non-organic) portion to the second (organic/non-incident) portion of the mesh. Note that such reassignments change the boundary between the two portions of the mesh, resulting in a change in the boundary edges and therefor the boundary vertices. Thus, a single pass may not be sufficient, and the process can include iteratively repeating the checking 1620 and the reassigning 1625 until no non-manifold boundary vertices remain. This can involve a check 1630 to determine if any reassignments were made in the last iteration through the boundary vertices. Once no further reassignments of triangles are needed, the process ends.

Returning to FIG. 15, once the partitioning 1520 is completed, one or more editable smooth surfaces are constructed 1525, e.g., by the CAD program(s) 1404, for the second portion of the polygon mesh. Each of the one or more editable smooth surfaces has a globally smooth parameterization, which permits globally smooth free-form surface editing. As noted above various types of surface definition formats can be used, including, T-NURCCs, T-splines, LR B-splines, and/or hierarchical B-splines. Various approaches can be used to construct 1525 editable smooth surface(s), including one or more the approaches described above in section 4, one or more the approaches described below in connection with FIG. 17, and/or one or more the approaches described in U.S. patent application Ser. No. 16/388,771, filed Apr. 18, 2019.

One or more boundaries of the one or more editable smooth surfaces are modified 1530, e.g., by the CAD program(s) 1404, to contact the one or more input solids (or one or more other modelled solids corresponding to regular geometric shapes fit to a scanned mesh) at one or more contact curves that are homeomorphic to an unmodified boundary between the one or more modified smooth surfaces and the one or more input solids (or one or more other modelled solids corresponding to regular geometric shapes fit to the scanned mesh). This ensures that the smooth surfaces constructed from the organic portion of the mesh will fully contact the input solid(s) (or other modelled solid(s) corresponding to regular geometric shape(s) fit to the scanned mesh). Thus, the final 3D model will be watertight. The modifying 1530 of the one or more editable smooth surfaces can include one or more the approaches described above in section 5, and/or one or more the approaches described below in connection with FIG. 17.

The one or more modified smooth surfaces are then combined 1535, e.g., by the CAD program(s) 1404, with the one or more input solids (or other modelled solid(s) corresponding to regular geometric shape(s) fit to the scanned mesh) to form a second 3D model of the object to be manufactured. The second 3D model includes the one or more modified smooth surfaces in contact with one or more portions of the one or more input solids (or other modelled solid(s)) in the boundary representation format at one or more gap-free contact curves. The second 3D model is watertight, and each of the one or more gap-free contact curves and each of the one or more modified smooth surfaces is editable using free-form modeling operations. The combining 1535 can include using Boolean operations that function on solids and oriented sheets or using cellular modelling techniques. The combining 1535 can include one or more the approaches described above in section 6, and/or one or more the approaches described below in connection with FIG. 17.

In addition in some implementations, additional processing can be performed on the second 3D model. For example, a check 1540 can be made to identify any of the one or more gap-free contact curves that do not providing at least tangent (G′) continuity between a modified smooth surface and an input solid. When such contact curves are identified, a blend operation can be applied 1545 at the at least one of the one or more gap-free contact curves to provide at least tangent (G′) continuity between the modified smooth surface and the input solid. Thus, one or more intersection curves between organic and incident regions can be replaced to improve the shape characteristics at one or more gap-free contact curves in the second 3D model. Other continuity checks and additional post-processing operations can also be performed, e.g., to make joint(s) have tangent (G¹) continuity or curve (G²) continuity.

Moreover, in some implementation, the second 3D model can be provided 1550, e.g., by CAD program(s) 1404, for use in manufacturing a physical structure corresponding to the object using one or more computer-controlled manufacturing systems, e.g., AM machine 1495, SM machine 1495, and/or other manufacturing machines. The providing 1550 can involve saving the watertight 3D model to a permanent storage device for use in manufacturing the physical structure corresponding to the object using the one or more computer-controlled manufacturing systems, e.g., AM machine 1495 and/or SM machine 1495. In some implementations, the providing 1550 involves generating 1552, e.g., by CAD program(s) 1404, toolpath specifications for the computer-controlled manufacturing system(s) (e.g., AM machine 1495 and/or SM machine 1495) using the second 3D model, and manufacturing 1554, e.g., by CAD program(s) 1404, at least a portion of the physical structure corresponding to the object with the computer-controlled manufacturing system(s) (e.g., AM machine 1495 and/or SM machine 1495) using the toolpath specifications generated for the additive manufacturing machine (e.g., AM machine 1495 and/or SM machine 1495).

FIG. 17 shows an example of a process to partition 1520 mesh geometry, construct 1525 one or more editable smooth surfaces for an organic portion of the mesh geometry, and modify 1530 one or more boundaries of the one or more editable smooth surfaces. Polygons of the mesh geometry are assigned 1705, e.g., by CAD program(s) 1404, to either the first (incident/non-organic) portion or the second (organic/non-incident) portion of the mesh. Then, one or more additional processing operations are performed at the organic boundary as part of the partitioning process, such as described above in section 3 and in connection with FIG. 16. This additional processing can include relaxing 1710, e.g., by CAD program(s) 1404, a boundary shape formed by boundary edges that lie on a boundary between the first portion and the second portion by at least in part shifting boundary vertex positions towards their averages to decrease angular and length deviations on the boundary shape. Further details of the relaxing 1710 are provided above in section 3.3.

For the constructing, regularity constraints are added 1715, e.g., by CAD program(s) 1404, on any boundary vertices with a flat interior surface angle. Further details for this are provided above in section 4.1 and in connection with FIG. 11. Boundary curve tangent direction propagation is applied 1720, e.g., by CAD program(s) 1404, along boundary edges that lie on a boundary between the first portion and the second portion. Further details for this are provided above in section 4.1.

A globally continuous map computation method is applied 1725, e.g., by CAD program(s) 1404, where the globally continuous map computation method is aligned with principal curvatures in anisotropic regions, scaled according to local curvatures, and quantized to obtain a quad partitioning of the map image. A global map relaxation is applied 1730, e.g., by CAD program(s) 1404, to improve smoothness of the global quad partitioning. Further details of the globally continuous map computation and global map relaxation are provided above in section 4.3. Moreover, a global surface approximation method is applied 1735, e.g., by CAD program(s) 1404, that contains an approximation error of the second portion of the mesh. Further details for this are provided above in section 4.4.

One or more boundaries of the one or more editable smooth surfaces are modified, e.g., by CAD program(s) 1404, to contact the modelled solid(s). While at least one surface boundary remains 1740 to be modified, the process continues, and once all the smooth surface boundaries have been modified to contact the modelled solid(s) the process ends. A safety tolerance value is set 1750, e.g., by CAD program(s) 1404, for the modifying based on accuracy limitations of (i) an intersection algorithm employed by the modifying (e.g., a Boolean operation) and/or (ii) the mesh's representation of the generative design created by the generative design process (or of the scanned physical object). Further details regarding safety tolerance values are provided above in section 5.3. The next boundary of an editable smooth surface is pulled 1755, e.g., by CAD program(s) 1404, toward at least one of the modelled solids by applying a gradient descent method for a distance function for the input solid evaluated for the pulled boundary. Further details for this are provided above in section 5.2. In some implementations, the safety tolerance value is iteratively adjusted to ensure the one or more contact curves of the one or more modified smooth surfaces with the one or more input solids are homeomorphic to the unmodified boundary. Thus, the check 1740 can include a check that the pulled boundary's curve is homeomorphic with ∂O before that boundary is done being modified.

In addition, in some cases, the pull algorithm can cause small surface self-intersections near high-curvature regions of ∂O, resulting in organic surface defects. If a surface self-intersection overlaps with the contact curve C=∂S∩O, the intersection algorithm can fail to compute C. To address this issue, an optional step can include adding 1745, e.g., by CAD program(s) 1404, one or more fairing energy terms (Halstead, M., Kass, M., and DeRose, T., Efficient, fair interpolation using Catmull-Clark surfaces, Proc. of SIGGRAPH 93, pp. 35-44, 1993) for one or more regions of the boundary when a curvature of the one or more regions near the boundary exceeds a threshold, thus mitigating this issue.

Embodiments of the subject matter and the functional operations described in this specification can be implemented in digital electronic circuitry, or in computer software, firmware, or hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. Embodiments of the subject matter described in this specification can be implemented using one or more modules of computer program instructions encoded on a non-transitory computer-readable medium for execution by, or to control the operation of, data processing apparatus. The computer-readable medium can be a manufactured product, such as a hard drive in a computer system or an optical disc sold through retail channels, or an embedded system. The computer-readable medium can be acquired separately and later encoded with the one or more modules of computer program instructions, such as by delivery of the one or more modules of computer program instructions over a wired or wireless network. The computer-readable medium can be a machine-readable storage device, a machine-readable storage substrate, a memory device, or a combination of one or more of them.

The term “data processing apparatus” encompasses all apparatus, devices, and machines for processing data, including by way of example a programmable processor, a computer, or multiple processors or computers. The apparatus can include, in addition to hardware, code that creates an execution environment for the computer program in question, (e.g., code that constitutes processor firmware, a protocol stack, a database management system, an operating system, a runtime environment, or a combination of one or more of them). In addition, the apparatus can employ various different computing model infrastructures, such as web services, distributed computing and grid computing infrastructures.

A computer program (also known as a program, software, software application, script, or code) can be written in any suitable form of programming language, including compiled or interpreted languages, declarative or procedural languages, and it can be deployed in any suitable form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code). A computer program can be deployed to be executed on one computer or on multiple computers that are located at one site or distributed across multiple sites and interconnected by a communication network.

The processes and logic flows described in this specification can be performed by one or more programmable processors executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by, and apparatus can also be implemented as, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit).

Processors suitable for the execution of a computer program include, by way of example, both general and special purpose microprocessors, and any one or more processors of any kind of digital computer. Generally, a processor will receive instructions and data from a read-only memory or a random access memory or both. The essential elements of a computer are a processor for performing instructions and one or more memory devices for storing instructions and data. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto-optical disks, or optical disks. However, a computer need not have such devices. Moreover, a computer can be embedded in another device, e.g., a mobile telephone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a Global Positioning System (GPS) receiver, or a portable storage device (e.g., a universal serial bus (USB) flash drive), to name just a few. Devices suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including by way of example semiconductor memory devices, e.g., EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.

To provide for interaction with a user, embodiments of the subject matter described in this specification can be implemented on a computer having a display device, e.g., an LCD (liquid crystal display) display device, an OLED (organic light emitting diode) display device, or another monitor, for displaying information to the user, and a keyboard and a pointing device, e.g., a mouse or a trackball, by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any suitable form of sensory feedback, e.g., visual feedback, auditory feedback, or tactile feedback; and input from the user can be received in any suitable form, including acoustic, speech, or tactile input.

The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. Embodiments of the subject matter described in this specification can be implemented in a computing system that includes a back-end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front-end component, e.g., a client computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the subject matter described is this specification, or any combination of one or more such back-end, middleware, or front-end components. The components of the system can be interconnected by any suitable form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a local area network (“LAN”) and a wide area network (“WAN”), an inter-network (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks).

While this specification contains many implementation details, these should not be construed as limitations on the scope of what is being or may be claimed, but rather as descriptions of features specific to particular embodiments of the disclosed subject matter. Certain features that are described in this specification in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination. Moreover, although features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a subcombination or variation of a subcombination.

Similarly, while operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In certain circumstances, multitasking and parallel processing may be advantageous. Moreover, the separation of various system components in the embodiments described above should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.

Thus, particular embodiments of the invention have been described. Other embodiments are within the scope of the following claims. In addition, the actions recited in the claims can be performed in a different order and still achieve desirable results. 

What is claimed is:
 1. A method comprising: obtaining, in a computer aided design program, a first three-dimensional model of an object to be manufactured, wherein the first three-dimensional model comprises a polygon mesh resulting from a generative design process employing one or more input solids as one or more sub-spaces of an optimization domain of the generative design process, the one or more input solids being in a boundary representation format; partitioning, by the computer aided design program, the polygon mesh into a first portion that is incident with the one or more input solids and a second portion that is not incident with the one or more input solids; constructing, by the computer aided design program, one or more editable smooth surfaces for the second portion of the polygon mesh, wherein each of the one or more editable smooth surfaces has a globally smooth parameterization, which permits globally smooth free-form surface editing; modifying, by the computer aided design program, one or more boundaries of the one or more editable smooth surfaces to contact the one or more input solids at one or more contact curves that are homeomorphic to an unmodified boundary between the one or more modified smooth surfaces and the one or more input solids; and combining, by the computer aided design program, the one or more modified smooth surfaces with the one or more input solids to form a second three-dimensional model of the object to be manufactured, wherein the second three-dimensional model comprises the one or more modified smooth surfaces in contact with one or more portions of the one or more input solids in the boundary representation format at one or more gap-free contact curves, wherein the second three-dimensional model is watertight, and wherein each of the one or more gap-free contact curves and each of the one or more modified smooth surfaces is editable using free-form modeling operations.
 2. The method of claim 1, wherein the generative design process employs a volumetric mesh method to create the generative design for the object, and the polygon mesh comprises a triangle mesh, either originally or by conversion thereto, coinciding with a boundary of the generative design.
 3. The method of claim 1, wherein the generative design process employs a level set method to create a generative design for the object, and the polygon mesh comprises a triangle mesh, either originally or by conversion thereto, approximating the generative design.
 4. The method of claim 1, wherein the polygon mesh comprises a triangle mesh, either originally or by conversion thereto, and the partitioning comprises assigning triangles to the first portion based on incidence data determined in accordance with generative design information associated with an accuracy of the generative design process.
 5. The method of claim 4, wherein the generative design information comprises distance information, and the assigning comprises assigning triangles to the first portion based on a threshold distance between vertices of the triangles and the one or more input solids, wherein a vertex of a triangle is treated as being incident with an input solid when the vertex is contained by or within the threshold distance of a surface of the input solid, and the threshold distance corresponds to a discretization accuracy of the triangle mesh's representation of the generative design created by the generative design process.
 6. The method of claim 4, wherein a triangle is assigned to the second portion when the triangle has at least one vertex that is not determined as being incident with an input solid.
 7. The method of claim 4, wherein the partitioning comprises: checking for any non-manifold boundary vertices that (i) lie on a boundary between the first portion and the second portion and (ii) connect more than two boundary edges that lie on the boundary between the first portion and the second portion; reassigning one or more incident triangles, which include such non-manifold boundary vertices, from the first portion to the second portion; and iteratively repeating the checking and the reassigning until no non-manifold boundary vertices remain.
 8. The method of claim 1, wherein the partitioning comprises relaxing a boundary shape formed by boundary edges that lie on a boundary between the first portion and the second portion by at least in part shifting boundary vertex positions towards their averages to decrease angular and length deviations on the boundary shape.
 9. The method of claim 1, wherein the constructing comprises: adding regularity constraints on any boundary vertices with a flat interior surface angle; applying boundary curve tangent direction propagation along boundary edges that lie on a boundary between the first portion and the second portion; applying a globally continuous map computation method, aligned with principal curvatures in anisotropic regions, scaled according to local curvatures, quantized to obtain a quad partitioning of the map image; applying a global map relaxation to improve smoothness of the global quad partitioning; and applying a global surface approximation method that contains an approximation error of the second portion of the mesh.
 10. The method of claim 1, wherein the modifying comprises: pulling at least one boundary of the one or more editable smooth surfaces toward at least one of the one or more input solids by applying a gradient descent method for a distance function for the input solid evaluated for the pulled boundary; setting a safety tolerance value for the modifying based on accuracy limitations of (i) an intersection algorithm employed by the modifying and/or (ii) the mesh's representation of the generative design created by the generative design process; and iteratively adjusting the safety tolerance value to ensure the one or more contact curves of the one or more modified smooth surfaces with the one or more input solids are homeomorphic to the unmodified boundary.
 11. The method of claim 10, comprising adding one or more fairing energy terms for one or more regions of the at least one boundary when a curvature of the one or more regions of the at least one boundary exceeds a threshold.
 12. The method of claim 1, wherein the combining comprises using Boolean operations that function on solids and oriented sheets or using cellular modelling techniques.
 13. The method of claim 1, wherein the computer aided design program comprises two or more programs that operate cooperatively on two or more separate computer processors.
 14. The method of claim 1, wherein the one or more input solids comprise two or more input solids, and the method comprises: detecting one or more gaps between at least two of the two or more input solids that are smaller than an accuracy of the generative design process; and expanding the at least two of the two or more input solids to fill the one or more gaps.
 15. The method of claim 1, comprising: identifying at least one of the one or more gap-free contact curves that does not provide at least tangent continuity between a modified smooth surface and an input solid; and applying a blend at the at least one of the one or more gap-free contact curves to provide at least tangent continuity between the modified smooth surface and the input solid.
 16. The method of claim 1, further comprising providing, by the computer aided design program, the second three-dimensional model for use in manufacturing a physical structure corresponding to the object using one or more computer-controlled manufacturing systems.
 17. The method of claim 16, wherein the providing comprises saving the second three-dimensional model to a permanent storage device for use in manufacturing the physical structure corresponding to the object using the one or more computer-controlled manufacturing systems.
 18. The method of claim 16, wherein the one or more computer-controlled manufacturing systems comprise an additive manufacturing machine or a subtractive manufacturing machine, and the providing comprises: generating toolpath specifications for the additive manufacturing machine or the subtractive manufacturing machine using the second three-dimensional model; and manufacturing at least a portion of the physical structure corresponding to the object with the additive manufacturing machine or the subtractive manufacturing machine using the toolpath specifications generated for the additive manufacturing machine or the subtractive manufacturing machine.
 19. A system comprising: a non-transitory storage medium having instructions of a computer aided design program stored thereon; and one or more data processing apparatus able to run the instructions of the computer aided design program to obtain a first three-dimensional model of an object to be manufactured, wherein the first three-dimensional model comprises a polygon mesh resulting from a generative design process employing one or more input solids as one or more sub-spaces of an optimization domain of the generative design process, the one or more input solids being in a boundary representation format; partition the polygon mesh into a first portion that is incident with the one or more input solids and a second portion that is not incident with the one or more input solids; construct one or more editable smooth surfaces for the second portion of the polygon mesh, wherein each of the one or more editable smooth surfaces has a globally smooth parameterization, which permits globally smooth free-form surface editing; modify one or more boundaries of the one or more editable smooth surfaces to contact the one or more input solids at one or more contact curves that are homeomorphic to an unmodified boundary between the one or more modified smooth surfaces and the one or more input solids; and combine the one or more modified smooth surfaces with the one or more input solids to form a second three-dimensional model of the object to be manufactured, wherein the second three-dimensional model comprises the one or more modified smooth surfaces in contact with one or more portions of the one or more input solids in the boundary representation format at one or more gap-free contact curves, wherein the second three-dimensional model is watertight, and wherein each of the one or more gap-free contact curves and each of the one or more modified smooth surfaces is editable using free-form modeling operations.
 20. The system of claim 19, comprising one or more computer-controlled manufacturing systems comprise an additive manufacturing machine or a subtractive manufacturing machine, wherein the one or more data processing apparatus are able to run the instructions of the computer aided design program to generate toolpath specifications for the additive manufacturing machine or the subtractive manufacturing machine from the second three-dimensional model, and manufacture at least a portion of the physical structure corresponding to the object with the additive manufacturing machine or the subtractive manufacturing machine using the toolpath specifications. 